cmake_minimum_required(VERSION 2.8)
# Project name.
project(ffmpeKthumbcreator)

# Some stock definition to get headers and stuff correct.
find_package(KDE4 REQUIRED)
include (KDE4Defaults)
include(MacroOptionalAddSubdirectory)
add_definitions( -DCMAKE_INSTALL_PREFIX=/usr )
add_definitions( -DKDE_DEFAULT_DEBUG_AREA=1988 )
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})

# Thumbnail creator definitions.
set(kde4-ffmpegthumbcreator_SRCS kde4-ffmpegthumbcreator.cpp)
kde4_add_plugin(ffmpeKthumbcreator ${kde4-ffmpegthumbcreator_SRCS})
target_link_libraries(ffmpeKthumbcreator ${KDE4_KIO_LIBS} ffmpegthumbnailer)

# Where to install the required files.
install(TARGETS ffmpeKthumbcreator DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES ffmpeKthumbcreator.desktop DESTINATION ${SERVICES_INSTALL_DIR})
